package Shared;

/**
 * Structure holding the form corresponding to an emergency.
 * 
 */
public class Form {
	// Caller name (witness)
	private String calleeName;

	// Caller phone number
	private String calleeNumber;

	// Caller position
	private MapPosition calleePosition;

	// Urgent emergency ?
	private boolean urgent;

	// Location of emergency
	private MapPosition location;

	// Additional description, of the situation
	private String description;

	/**
	 * Creates a form with the specified parameters of the emergency
	 * 
	 * @param calleeName
	 *            The name of the person who called
	 * @param calleeNumber
	 *            The phone number of the person who called
	 * @param calleePosition
	 *            The position of the person who called
	 * @param isUrgent
	 *            True if the emergency requires an equipped ambulance.
	 * @param location
	 *            The location of the emergency
	 * @param description
	 *            The description of the emergency
	 */

	public Form(String calleeName, String calleeNumber, MapPosition calleePosition, boolean isUrgent,
			MapPosition location, String description) {

		this.calleeName = calleeName;
		this.calleeNumber = calleeNumber;
		this.calleePosition = calleePosition;

		this.urgent = isUrgent;
		this.location = location;
		this.description = description;
	}

	/**
	 * Checks if the form registers an urgent emergency or not
	 * 
	 * @return true if the emergency is urgent, false otherwise
	 */
	public boolean isUrgent() {
		return this.urgent;
	}

	/**
	 * Returns the location of the emergency
	 */

	public MapPosition getLocation() {
		return location;
	}

	/**
	 * Getter for caller name
	 * 
	 * @return Caller name registered in the form
	 */
	public String getCalleeName() {
		return calleeName;
	}

	/**
	 * Setter for the caller name registered in the form
	 * 
	 * @param calleeName
	 */
	public void setCalleeName(String calleeName) {
		this.calleeName = calleeName;
	}

	/**
	 * Getter for the caller number
	 * 
	 * @return Caller number registered in the form
	 */
	public String getCalleeNumber() {
		return calleeNumber;
	}

	/**
	 * Setter for caller number
	 * 
	 * @param calleeNumber
	 */
	public void setCalleeNumber(String calleeNumber) {
		this.calleeNumber = calleeNumber;
	}

	/**
	 * Getter for caller position
	 * 
	 * @return Caller position as registered in the form
	 */
	public MapPosition getCalleePosition() {
		return calleePosition;
	}

	/**
	 * Sets the caller position to calleeposition
	 * 
	 * @param calleePosition
	 */
	public void setCalleePosition(MapPosition calleePosition) {
		this.calleePosition = calleePosition;
	}

	/**
	 * Getter for the description
	 * 
	 * @return description of emergency as registered in the form
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Setter for the description
	 * 
	 * @param description
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * Setter for the importance of emergency
	 * 
	 * @param urgent
	 */
	public void setUrgent(boolean urgent) {
		this.urgent = urgent;
	}

	/**
	 * Sets the location of emergency
	 * 
	 * @param location
	 */
	public void setLocation(MapPosition location) {
		this.location = location;
	}

}
